package com.xinshujia.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xinshujia.entity.ThresholdEntity;

/**
 * *************************************
 * *   @author: 野狼上校               **
 * *   @since: 2024-07-20 09:22       **
 * *   @version: 1.0                  **
 * *************************************
 * <p>
 * 阈值服务接口
 */
public interface ThresholdService extends IService<ThresholdEntity> {
    /**
     * 设置或更新阈值
     *
     * @param thresholdEntity 阈值实体
     * @return Boolean
     */
    Boolean setOrUpdateThreshold(ThresholdEntity thresholdEntity);

    /**
     * 分页查询所有设备的阈值
     */
    Page<ThresholdEntity> findThresholdsByPage(Long pageNum, Long pageSize);

    /**
     * 根据deviceGuid查询该设备的阈值详情(分页)
     */
    Page<ThresholdEntity> findThresholdsByDeviceGuid(Long pageNum, Long pageSize, String deviceGuid);

    /**
     * 根据deviceGuid查询该设备的阈值详情
     */
    ThresholdEntity findThresholdByDeviceGuid(String deviceGuid);
}
